#ifndef CHATROOMVIEW_H
#define CHATROOMVIEW_H

#include <QWidget>

namespace Ui {
    class ChatroomView;
}

class ChatroomView : public QWidget
{
    Q_OBJECT

public:
    explicit ChatroomView(QWidget *parent = 0);
    ~ChatroomView();

    void setName(const QString& aRoomName);
    const QString& name();

private:
    Ui::ChatroomView *ui;

    QString iRoomName;

    void appendLine(const QString& aLine);

signals:
    void messageProvided(ChatroomView* aView, QString aText);

public slots:
    void onMessage(QString aFrom, int aTime, QString aText);

private slots:
    void onPrevRoom();
    void onNextRoom();
    void onShowRoomList();
    void onShowUserList();
    void onOptions();

};

#endif // CHATROOMVIEW_H
